﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Xsl;
using System.IO;
using System.Xml;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        XDocument mydoc = XDocument.Load(Server.MapPath("..") + "\\public\\data\\data.xml");
        XslCompiledTransform xslt = new XslCompiledTransform();
        xslt.Load(Server.MapPath("..") + "\\public\\data\\data.xsl");
        // Execute the transform and output the results to a writer.
        StringWriter sw = new StringWriter();
        //XsltSettings mysettings = new XsltSettings();
        MemoryStream ms = new MemoryStream();
        xslt.Transform(mydoc.CreateReader(), null, ms);
        ms.Position = 0;
        StreamReader sr = new StreamReader(ms);
        album.InnerHtml = sr.ReadToEnd();
    }
}